<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>

        function getMax(arr) {
            var max = arr[0];
            for (var i = 0; i < arr.length; i++) {
                if (arr[i] > max ){
                    max = arr[i];
                }
            }
            return max;
        }
        // var newArr = [5, 2, 99, 121, 67, 77];
        // console.log(getMax([5, 2, 99, 121, 67, 77]));
        var result = getMax([5, 2, 99, 121, 67, 77]);
        console.log(result);
    </script>
</head>
<body>

</body>
</html>